-- GENERATED SPELL FOR [Shadow Cultist] --


function spell0_29717(pUnit, Event) --@Mind Sear,n/a--
pUnit:FullCastSpellOnTarget(32000,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29717', 3000, 1)
end

function spell1_29717(pUnit, Event) --@Shadowform,Self--
pUnit:FullCastSpellOnTarget(16592,pUnit)
pUnit:RegisterEvent('Sorts_29717', 657, 1)
end

function Sorts_29717(pUnit, Event)
local choix_sorts_29717 = math.random(0, 1)
if choix_sorts_29717 == 0 then
pUnit:RegisterEvent('spell0_29717', 1, 1)
end
if choix_sorts_29717 == 1 then
pUnit:RegisterEvent('spell1_29717', 1, 1)
end
end

function mob29717_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29717', math.random(1500, 3000), 1)
end

function mob29717_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29717_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29717_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29717, 1, 'mob29717_Action')
RegisterUnitEvent(29717, 2, 'mob29717_Leave')
RegisterUnitEvent(29717, 3, 'mob29717_Kill')
RegisterUnitEvent(29717, 4, 'mob29717_Die')
